{if !empty($diyitem['data'])}
    {if empty($diyitem['params']['showtype']) || count($diyitem['data'])<=intval($diyitem['params']['rownum'])}
        <div class="fui-picturew row-{$diyitem['params']['rownum']}" style="padding: {$diyitem['style']['paddingtop']}px {$diyitem['style']['paddingleft']}px; background: {$diyitem['style']['background']};">
            {loop $diyitem['data'] $pictureitem}
                <a class="item" style="padding: {$diyitem['style']['paddingtop']}px {$diyitem['style']['paddingleft']}px;" href="{$pictureitem['linkurl']}">
                    <div class="image">
                        <img src="{php echo tomedia($pictureitem['imgurl'])}">
                        {if !empty($pictureitem['title'])}
                            <div class="title" style="color: {$diyitem['style']['titlecolor']}; text-align: {$diyitem['style']['titlealign']};">{$pictureitem['title']}</div>
                        {/if}
                    </div>
                    <div class="text center" style="color: {$diyitem['style']['textcolor']}; text-align: {$diyitem['style']['textalign']};">{$pictureitem['text']}</div>
                </a>
            {/loop}
        </div>
    {else}
        <div class="swiper swiper-{$diyitemid}" data-element=".swiper-{$diyitemid}" data-view="{$diyitem['params']['rownum']}" data-btn="true">
            <div class="swiper-container fui-picturew row-{$diyitem['params']['rownum']}" style="padding: {$diyitem['style']['paddingtop']}px {$diyitem['style']['paddingleft']}px; background: {$diyitem['style']['background']};">
                <div class="swiper-wrapper">
                    {loop $diyitem['data'] $pictureitem}
                        <a class="swiper-slide item" style="padding: {$diyitem['style']['paddingtop']}px {$diyitem['style']['paddingleft']}px;" href="{$pictureitem['linkurl']}">
                            <div class="image">
                                <img src="{php echo tomedia($pictureitem['imgurl'])}">
                                {if !empty($pictureitem['title'])}
                                    <div class="title" style="color: {$diyitem['style']['titlecolor']}; text-align: {$diyitem['style']['titlealign']};">{$pictureitem['title']}</div>
                                {/if}
                            </div>
                            <div class="text center" style="color: {$diyitem['style']['textcolor']}; text-align: {$diyitem['style']['textalign']};">{$pictureitem['text']}</div>
                        </a>
                    {/loop}
                </div>
                {if !empty($diyitem['params']['showbtn'])}
                    <div class="swiper-button-next swiper-button-white"></div>
                    <div class="swiper-button-prev swiper-button-white"></div>
                {/if}
            </div>
        </div>
    {/if}
{/if}